
package com.example.caorl.job1.conc0302.atomic;

public class Count {

    private int num = 0;

//    public int add() {
//        return num++;
//    }
    public int add() {
//        System.out.println(Thread.currentThread().getName());
        return num = num + 1;
    }

    public int getNum() {
        return num;
    }
}
